
package std.core


@!APILevel[
    since: "22"
]
public enum AnnotationKind {
    @!APILevel[
        since: "22"
    ]
    Type |
    @!APILevel[
        since: "22"
    ]
    Parameter |
    @!APILevel[
        since: "22"
    ]
    Init |
    @!APILevel[
        since: "22"
    ]
    MemberProperty |
    @!APILevel[
        since: "22"
    ]
    MemberFunction |
    @!APILevel[
        since: "22"
    ]
    MemberVariable |
    @!APILevel[
        since: "22"
    ]
    EnumConstructor |
    @!APILevel[
        since: "22"
    ]
    GlobalFunction |
    @!APILevel[
        since: "22"
    ]
    GlobalVariable |
    @!APILevel[
        since: "22"
    ]
    Extension |
    @!APILevel[
        since: "22"
    ]
    ...
}

@!APILevel[
    since: "22"
]
public open class ArithmeticException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@ConstSafe
@!APILevel[
    since: "22"
]
public struct Array<T> {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public const init()
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public init(size: Int64, repeat!: T)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public init(size: Int64, initElement: (Int64) -> T)
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public prop first: Option<T>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public prop last: Option<T>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func slice(start: Int64, len: Int64): Array<T>
    
    @OverflowWrapping
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func get(index: Int64): Option<T>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func [](index: Int64): T
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func [](index: Int64, value!: T): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func [](range: Range<Int64>): Array<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fill(value: T): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func [](range: Range<Int64>, value!: Array<T>): Unit
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func reverse(): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func clone(): Array<T>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func clone(range: Range<Int64>): Array<T>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func copyTo(dst: Array<T>, srcStart: Int64, dstStart: Int64, copyLen: Int64): Unit
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func copyTo(dst: Array<T>): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func concat(other: Array<T>): Array<T>
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func swap(index1: Int64, index2: Int64): Unit
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func splitAt(mid: Int64): (Array<T>, Array<T>)
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func repeat(n: Int64): Array<T>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func map<R>(transform: (T) -> R): Array<R>
}

extend<T> Array<Array<T>> {
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func flatten(): Array<T>
}

extend<T> Array<T> <: Collection<T> {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func iterator(): Iterator<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public prop size: Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func isEmpty(): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func toArray(): Array<T>
}

extend<T> Array<T> <: ToString where T <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

@ConstSafe
extend<T> Array<T> <: Equatable<Array<T>> where T <: Equatable<T> {
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator const func ==(that: Array<T>): Bool
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator const func !=(that: Array<T>): Bool
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func contains(element: T): Bool
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func indexOf(element: T): Option<Int64>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func indexOf(element: T, fromIndex: Int64): Option<Int64>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func indexOf(elements: Array<T>): Option<Int64>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func indexOf(elements: Array<T>, fromIndex: Int64): Option<Int64>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func lastIndexOf(element: T): Option<Int64>
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func lastIndexOf(element: T, fromIndex: Int64): Option<Int64>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func lastIndexOf(elements: Array<T>): Option<Int64>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func lastIndexOf(elements: Array<T>, fromIndex: Int64): Option<Int64>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimStart(set: Array<T>): Array<T>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimEnd(set: Array<T>): Array<T>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimStart(predicate: (T) -> Bool): Array<T>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimEnd(predicate: (T) -> Bool): Array<T>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func removePrefix(prefix: Array<T>): Array<T>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func removeSuffix(suffix: Array<T>): Array<T>
}

@!APILevel[
    since: "22"
]
public class ArrayIterator<T> <: Iterator<T> {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public init(data: Array<T>)
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func next(): Option<T>
}

@!APILevel[
    since: "22"
]
public struct CPointerHandle<T> where T <: CType {
    @!APILevel[
        since: "22"
    ]
    public let pointer: CPointer<T>
    
    @!APILevel[
        since: "22"
    ]
    public let array: Array<T>
    
    @Deprecated[message: "Use global function `public unsafe func acquireArrayRawData<T>(arr: Array<T>): CPointerHandle<T> where T <: CType` instead."]
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @Deprecated[message: "Use global function `public unsafe func acquireArrayRawData<T>(arr: Array<T>): CPointerHandle<T> where T <: CType` instead."]
    @!APILevel[
        since: "22"
    ]
    public init(ptr: CPointer<T>, arr: Array<T>)
}

@Frozen
@!APILevel[
    since: "22"
]
public unsafe func acquireArrayRawData<T>(arr: Array<T>): CPointerHandle<T> where T <: CType

@Frozen
@!APILevel[
    since: "22"
]
public unsafe func releaseArrayRawData<T>(handle: CPointerHandle<T>): Unit where T <: CType

@!APILevel[
    since: "22"
]
public class Box<T> {
    @!APILevel[
        since: "22"
    ]
    public var value: T
    
    @!APILevel[
        since: "22"
    ]
    public init(v: T)
}

extend<T> Box<T> <: Hashable where T <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

extend<T> Box<T> <: Comparable<Box<T>> where T <: Comparable<T> {
    @!APILevel[
        since: "22"
    ]
    public operator func ==(that: Box<T>): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(that: Box<T>): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func >(that: Box<T>): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func <(that: Box<T>): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func >=(that: Box<T>): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func <=(that: Box<T>): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func compare(that: Box<T>): Ordering
}

extend<T> Box<T> <: ToString where T <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
}

extend Byte {
    @!APILevel[
        since: "22"
    ]
    public func isAsciiLetter(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiNumber(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiHex(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiOct(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiPunctuation(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiGraphic(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiControl(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiNumberOrLetter(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiLowerCase(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiUpperCase(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAscii(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiWhiteSpace(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func toAsciiUpperCase(): Byte
    
    @!APILevel[
        since: "22"
    ]
    public func toAsciiLowerCase(): Byte
}

extend<T> CPointer<T> {
    @!APILevel[
        since: "22"
    ]
    public func isNull(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isNotNull(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func toUIntNative(): UIntNative
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public unsafe func read(): T
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public unsafe func write(value: T): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public unsafe func read(idx: Int64): T
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public unsafe func write(idx: Int64, value: T): Unit
    
    @!APILevel[
        since: "22"
    ]
    public unsafe operator func +(offset: Int64): CPointer<T>
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public unsafe operator func -(offset: Int64): CPointer<T>
    
    @!APILevel[
        since: "22"
    ]
    public func asResource(): CPointerResource<T>
}

@!APILevel[
    since: "22"
]
public struct CPointerResource<T> <: Resource where T <: CType {
    @!APILevel[
        since: "22"
    ]
    public let value: CPointer<T>
    
    @!APILevel[
        since: "22"
    ]
    public func isClosed(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func close(): Unit
}

extend CString <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func getChars(): CPointer<UInt8>
    
    @!APILevel[
        since: "22"
    ]
    public func isNull(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func size(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public func isEmpty(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isNotEmpty(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func startsWith(prefix: CString): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func endsWith(suffix: CString): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func equals(rhs: CString): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func equalsLower(rhs: CString): Bool
    
    /**
    * @throws IllegalArgumentException
    * @throws IllegalMemoryException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func subCString(beginIndex: UIntNative): CString
    
    /**
    * @throws IllegalArgumentException
    * @throws IllegalMemoryException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func subCString(beginIndex: UIntNative, subLen: UIntNative): CString
    
    /**
    * @throws IllegalMemoryException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func compare(str: CString): Int32
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
    
    @!APILevel[
        since: "22"
    ]
    public func asResource(): CStringResource
}

@!APILevel[
    since: "22"
]
public struct CStringResource <: Resource {
    @!APILevel[
        since: "22"
    ]
    public let value: CString
    
    @!APILevel[
        since: "22"
    ]
    public func isClosed(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func close(): Unit
}

@!APILevel[
    since: "22"
]
sealed interface CType {
}

extend Rune {
    @!APILevel[
        since: "22"
    ]
    public func isAsciiLetter(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiNumber(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiHex(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiOct(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiPunctuation(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiGraphic(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiControl(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiNumberOrLetter(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiLowerCase(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiUpperCase(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAscii(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isAsciiWhiteSpace(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func toAsciiUpperCase(): Rune
    
    @!APILevel[
        since: "22"
    ]
    public func toAsciiLowerCase(): Rune
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func utf8Size(arr: Array<UInt8>, index: Int64): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public static func utf8Size(c: Rune): Int64
    
    /**
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func fromUtf8(arr: Array<UInt8>, index: Int64): (Rune, Int64)
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func getPreviousFromUtf8(arr: Array<UInt8>, index: Int64): (Rune, Int64)
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func intoUtf8Array(c: Rune, arr: Array<UInt8>, index: Int64): Int64
}

extend Rune <: Comparable<Rune> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Rune): Ordering
}

@!APILevel[
    since: "22"
]
public interface Collection<T> <: Iterable<T> {
    @!APILevel[
        since: "22"
    ]
    prop size: Int64
    
    @!APILevel[
        since: "22"
    ]
    func isEmpty(): Bool
    
    @!APILevel[
        since: "22"
    ]
    func toArray(): Array<T>
}

@!APILevel[
    since: "22"
]
public enum Ordering {
    @!APILevel[
        since: "22"
    ]
    LT |
    @!APILevel[
        since: "22"
    ]
    GT |
    @!APILevel[
        since: "22"
    ]
    EQ
}

@!APILevel[
    since: "22"
]
public interface Less<T> {
    @!APILevel[
        since: "22"
    ]
    operator func <(rhs: T): Bool
}

@!APILevel[
    since: "22"
]
public interface Greater<T> {
    @!APILevel[
        since: "22"
    ]
    operator func >(rhs: T): Bool
}

@!APILevel[
    since: "22"
]
public interface LessOrEqual<T> {
    @!APILevel[
        since: "22"
    ]
    operator func <=(rhs: T): Bool
}

@!APILevel[
    since: "22"
]
public interface GreaterOrEqual<T> {
    @!APILevel[
        since: "22"
    ]
    operator func >=(rhs: T): Bool
}

@!APILevel[
    since: "22"
]
public interface Comparable<T> <: Equatable<T> & Less<T> & Greater<T> & LessOrEqual<T> & GreaterOrEqual<T> {
    @!APILevel[
        since: "22"
    ]
    func compare(that: T): Ordering
    
    @!APILevel[
        since: "22"
    ]
    operator func ==(rhs: T): Bool
    
    @!APILevel[
        since: "22"
    ]
    operator func <(rhs: T): Bool
    
    @!APILevel[
        since: "22"
    ]
    operator func >(rhs: T): Bool
    
    @!APILevel[
        since: "22"
    ]
    operator func <=(rhs: T): Bool
    
    @!APILevel[
        since: "22"
    ]
    operator func >=(rhs: T): Bool
}

extend Ordering <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
}

extend Ordering <: Comparable<Ordering> {
    @!APILevel[
        since: "22"
    ]
    public func compare(that: Ordering): Ordering
}

extend IntNative <: Comparable<IntNative> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: IntNative): Ordering
}

extend Int64 <: Comparable<Int64> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Int64): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: Int64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: Int64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: Int64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: Int64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: Int64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: Int64): Bool
}

extend Int32 <: Comparable<Int32> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Int32): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: Int32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: Int32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: Int32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: Int32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: Int32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: Int32): Bool
}

extend Int16 <: Comparable<Int16> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Int16): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: Int16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: Int16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: Int16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: Int16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: Int16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: Int16): Bool
}

extend Int8 <: Comparable<Int8> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Int8): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: Int8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: Int8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: Int8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: Int8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: Int8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: Int8): Bool
}

extend UIntNative <: Comparable<UIntNative> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: UIntNative): Ordering
}

extend UInt64 <: Comparable<UInt64> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: UInt64): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: UInt64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: UInt64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: UInt64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: UInt64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: UInt64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: UInt64): Bool
}

extend UInt32 <: Comparable<UInt32> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: UInt32): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: UInt32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: UInt32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: UInt32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: UInt32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: UInt32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: UInt32): Bool
}

extend UInt16 <: Comparable<UInt16> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: UInt16): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: UInt16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: UInt16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: UInt16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: UInt16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: UInt16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: UInt16): Bool
}

extend UInt8 <: Comparable<UInt8> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: UInt8): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: UInt8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: UInt8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: UInt8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: UInt8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: UInt8): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: UInt8): Bool
}

extend Float16 <: Comparable<Float16> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Float16): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: Float16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: Float16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: Float16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: Float16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: Float16): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: Float16): Bool
}

extend Float32 <: Comparable<Float32> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Float32): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: Float32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: Float32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: Float32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: Float32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: Float32): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: Float32): Bool
}

extend Float64 <: Comparable<Float64> {
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Float64): Ordering
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <(rhs: Float64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >(rhs: Float64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func <=(rhs: Float64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func >=(rhs: Float64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(rhs: Float64): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(rhs: Float64): Bool
}

@Frozen
@!APILevel[
    since: "22"
]
public func max<T>(a: T, b: T, others: Array<T>): T where T <: Comparable<T>

@Frozen
@!APILevel[
    since: "22"
]
public func min<T>(a: T, b: T, others: Array<T>): T where T <: Comparable<T>

@!APILevel[
    since: "22"
]
public interface Countable<T> {
    @!APILevel[
        since: "22"
    ]
    func next(right: Int64): T
    
    @!APILevel[
        since: "22"
    ]
    func position(): Int64
}

extend IntNative <: Countable<IntNative> {
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): IntNative
}

extend Int64 <: Countable<Int64> {
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): Int64
}

extend Int32 <: Countable<Int32> {
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): Int32
}

extend Int16 <: Countable<Int16> {
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): Int16
}

extend Int8 <: Countable<Int8> {
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): Int8
}

extend UIntNative <: Countable<UIntNative> {
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): UIntNative
}

extend UInt64 <: Countable<UInt64> {
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): UInt64
}

extend UInt32 <: Countable<UInt32> {
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): UInt32
}

extend UInt16 <: Countable<UInt16> {
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): UInt16
}

extend UInt8 <: Countable<UInt8> {
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): UInt8
}

extend Rune <: Countable<Rune> {
    @!APILevel[
        since: "22"
    ]
    public func position(): Int64
    
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func next(right: Int64): Rune
}

@!APILevel[
    since: "22"
]
public struct Duration <: ToString & Hashable & Comparable<Duration> {
    @!APILevel[
        since: "22"
    ]
    public static const nanosecond: Duration = Duration(0, 1)
    
    @!APILevel[
        since: "22"
    ]
    public static const microsecond: Duration = Duration(0, 1000u32)
    
    @!APILevel[
        since: "22"
    ]
    public static const millisecond: Duration = Duration(0, 1000000u32)
    
    @!APILevel[
        since: "22"
    ]
    public static const second: Duration = Duration(1, 0)
    
    @!APILevel[
        since: "22"
    ]
    public static const minute: Duration = Duration(SECS_PER_MINUTE, 0)
    
    @!APILevel[
        since: "22"
    ]
    public static const hour: Duration = Duration(SECS_PER_HOUR, 0)
    
    @!APILevel[
        since: "22"
    ]
    public static const day: Duration = Duration(SECS_PER_DAY, 0)
    
    @!APILevel[
        since: "22"
    ]
    public static const Zero: Duration = Duration(0, 0)
    
    @!APILevel[
        since: "22"
    ]
    public static const Max: Duration = Duration(MAX_INT64, MAX_NANOSECOND)
    
    @!APILevel[
        since: "22"
    ]
    public static const Min: Duration = Duration(MIN_INT64, 0)
    
    /**
    * @throws ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toNanoseconds(): Int64
    
    /**
    * @throws ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toMicroseconds(): Int64
    
    /**
    * @throws ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toMilliseconds(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public func toSeconds(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public func toMinutes(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public func toHours(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public func toDays(): Int64
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
    
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    /**
    * @throws ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func abs(): Duration
    
    /**
    * @throws ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func +(r: Duration): Duration
    
    /**
    * @throws ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func -(r: Duration): Duration
    
    /**
    * @throws ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func *(r: Int64): Duration
    
    /**
    * @throws ArithmeticException
    * @throws getOrThrow
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func *(r: Float64): Duration
    
    /**
    * @throws ArithmeticException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func /(r: Int64): Duration
    
    /**
    * @throws ArithmeticException
    * @throws getOrThrow
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func /(r: Float64): Duration
    
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func /(r: Duration): Float64
    
    @!APILevel[
        since: "22"
    ]
    public operator func ==(r: Duration): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func !=(r: Duration): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func >=(r: Duration): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func >(r: Duration): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func <=(r: Duration): Bool
    
    @!APILevel[
        since: "22"
    ]
    public operator func <(r: Duration): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func compare(rhs: Duration): Ordering
}

extend Int64 {
    /**
    * @throws ArithmeticException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func *(r: Duration): Duration
}




extend Float64 {
    /**
    * @throws ArithmeticException
    * @throws getOrThrow
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator func *(r: Duration): Duration
}


@!APILevel[
    since: "22"
]
public enum Endian {
    @!APILevel[
        since: "22"
    ]
    Big |
    @!APILevel[
        since: "22"
    ]
    Little
    /**
    * @throws Exception
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static prop Platform: Endian
}

@!APILevel[
    since: "22"
]
public interface Equal<T> {
    @!APILevel[
        since: "22"
    ]
    operator func ==(rhs: T): Bool
}

@!APILevel[
    since: "22"
]
public interface NotEqual<T> {
    @!APILevel[
        since: "22"
    ]
    operator func !=(rhs: T): Bool
}

@!APILevel[
    since: "22"
]
public interface Equatable<T> <: Equal<T> & NotEqual<T> {
    @!APILevel[
        since: "22"
    ]
    operator func !=(rhs: T): Bool
}



extend<T> Range<T> <: Equatable<Range<T>> where T <: Countable<T> & Comparable<T> & Equatable<T> {
    @!APILevel[
        since: "22"
    ]
    public operator func ==(that: Range<T>): Bool
}

@!APILevel[
    since: "22"
]
public open class Error <: ToString {
    @!APILevel[
        since: "22"
    ]
    public open prop message: String
    
    @!APILevel[
        since: "22"
    ]
    public open func toString(): String
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws OutOfMemoryError
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public open func printStackTrace(): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public open func getStackTraceMessage(): String
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func getStackTrace(): Array<StackTraceElement>
}

@!APILevel[
    since: "22"
]
public open class Exception <: ToString {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
    
    @!APILevel[
        since: "22"
    ]
    public open prop message: String
    
    @!APILevel[
        since: "22"
    ]
    public open func toString(): String
    
    /**
    * @throws OutOfMemoryError
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func printStackTrace(): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func getStackTrace(): Array<StackTraceElement>
}

extend Float64 {
    @!APILevel[
        since: "22"
    ]
    public static func fromBits(bits: UInt64): Float64
    
    @!APILevel[
        since: "22"
    ]
    public func toBits(): UInt64
}

extend Float32 {
    @!APILevel[
        since: "22"
    ]
    public static func fromBits(bits: UInt32): Float32
    
    @!APILevel[
        since: "22"
    ]
    public func toBits(): UInt32
}

extend Float16 {
    @!APILevel[
        since: "22"
    ]
    public static func fromBits(bits: UInt16): Float16
    
    @!APILevel[
        since: "22"
    ]
    public func toBits(): UInt16
}







@!APILevel[
    since: "22"
]
public class Future<T> {
    @!APILevel[
        since: "22"
    ]
    public prop thread: Thread
    
    @!APILevel[
        since: "22"
    ]
    public func get(): T
    
    @!APILevel[
        since: "22"
    ]
    public func tryGet(): Option<T>
    
    /**
    * @throws ArithmeticException
    * @throws TimeoutException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func get(timeout: Duration): T
    
    @!APILevel[
        since: "22"
    ]
    public func cancel(): Unit
}

@!APILevel[
    since: "22"
]
public interface ThreadContext {
    @!APILevel[
        since: "22"
    ]
    func end(): Unit
    
    @!APILevel[
        since: "22"
    ]
    func hasEnded(): Bool
}

@!APILevel[
    since: "22"
]
public interface Hashable {
    @!APILevel[
        since: "22"
    ]
    func hashCode(): Int64
}

extend Ordering <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

extend Unit <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

extend Bool <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

extend Rune <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

extend IntNative <: Hashable {
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: IntNative
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: IntNative
}

extend Int64 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: Int64
}

extend Int32 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: Int32
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: Int32
}

extend Int16 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: Int16
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: Int16
}

extend Int8 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: Int8
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: Int8
}

extend UIntNative <: Hashable {
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: UIntNative
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: UIntNative
}

extend UInt64 <: Hashable {
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: UInt64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: UInt64
}

extend UInt32 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: UInt32
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: UInt32
}

extend UInt16 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: UInt16
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: UInt16
}

extend UInt8 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: UInt8
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: UInt8
}

extend Float64 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop NaN: Float64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Inf: Float64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: Float64
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: Float64
    
    @!APILevel[
        since: "22"
    ]
    public static prop MinDenormal: Float64
    
    @!APILevel[
        since: "22"
    ]
    public static prop MinNormal: Float64
    
    @!APILevel[
        since: "22"
    ]
    public func isInf(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isNaN(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isNormal(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public static func max(a: Float64, b: Float64, others: Array<Float64>): Float64
    
    @!APILevel[
        since: "22"
    ]
    public static func min(a: Float64, b: Float64, others: Array<Float64>): Float64
}

extend Float32 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop NaN: Float32
    
    @!APILevel[
        since: "22"
    ]
    public static prop Inf: Float32
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: Float32
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: Float32
    
    @!APILevel[
        since: "22"
    ]
    public static prop MinDenormal: Float32
    
    @!APILevel[
        since: "22"
    ]
    public static prop MinNormal: Float32
    
    @!APILevel[
        since: "22"
    ]
    public func isInf(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isNaN(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isNormal(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public static func max(a: Float32, b: Float32, others: Array<Float32>): Float32
    
    @!APILevel[
        since: "22"
    ]
    public static func min(a: Float32, b: Float32, others: Array<Float32>): Float32
}

extend Float16 <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public static prop NaN: Float16
    
    @!APILevel[
        since: "22"
    ]
    public static prop Inf: Float16
    
    @!APILevel[
        since: "22"
    ]
    public static prop Max: Float16
    
    @!APILevel[
        since: "22"
    ]
    public static prop Min: Float16
    
    @!APILevel[
        since: "22"
    ]
    public static prop MinDenormal: Float16
    
    @!APILevel[
        since: "22"
    ]
    public static prop MinNormal: Float16
    
    @!APILevel[
        since: "22"
    ]
    public func isInf(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isNaN(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func isNormal(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public static func max(a: Float16, b: Float16, others: Array<Float16>): Float16
    
    @!APILevel[
        since: "22"
    ]
    public static func min(a: Float16, b: Float16, others: Array<Float16>): Float16
}

extend<T> Range<T> <: Hashable where T <: Hashable & Countable<T> & Comparable<T> & Equatable<T> {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

@!APILevel[
    since: "22"
]
public interface Hasher {
    @!APILevel[
        since: "22"
    ]
    func finish(): Int64
    
    @!APILevel[
        since: "22"
    ]
    mut func reset(): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Bool): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Rune): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Int8): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Int16): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Int32): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Int64): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: UInt8): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: UInt16): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: UInt32): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: UInt64): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Float16): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Float32): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: Float64): Unit
    
    @!APILevel[
        since: "22"
    ]
    mut func write(value: String): Unit
}

@!APILevel[
    since: "22"
]
public struct DefaultHasher <: Hasher {
    @!APILevel[
        since: "22"
    ]
    public func finish(): Int64
    
    @!APILevel[
        since: "22"
    ]
    public mut func reset(): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Bool): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Rune): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Int8): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Int16): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Int32): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Int64): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: UInt8): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: UInt16): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: UInt32): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: UInt64): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Float16): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Float32): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: Float64): Unit
    
    @!APILevel[
        since: "22"
    ]
    public mut func write(value: String): Unit
    
    @!APILevel[
        since: "22"
    ]
    public init(res!: Int64 = 0)
}

@!APILevel[
    since: "22"
]
public open class IllegalArgumentException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public open class IllegalFormatException <: IllegalArgumentException {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public class IllegalMemoryException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public class IllegalStateException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public class IncompatiblePackageException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public class IndexOutOfBoundsException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public interface Iterable<E> {
    @!APILevel[
        since: "22"
    ]
    func iterator(): Iterator<E>
}

@!APILevel[
    since: "22"
]
public abstract class Iterator<T> <: Iterable<T> {
    @!APILevel[
        since: "22"
    ]
    public func next(): Option<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func iterator(): Iterator<T>
}

extend<T> Iterator<T> where T <: Equatable<T> {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func contains(element: T): Bool
}

extend<T> Iterator<T> where T <: Comparable<T> {
    @!APILevel[
        since: "22"
    ]
    public func max(): Option<T>
    
    @!APILevel[
        since: "22"
    ]
    public func min(): Option<T>
}

extend<T> Iterator<T> {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func zip<R>(it: Iterator<R>): Iterator<(T, R)>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func enumerate(): Iterator<(Int64, T)>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func filter(predicate: (T) -> Bool): Iterator<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func filterMap<R>(transform: (T) -> Option<R>): Iterator<R>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func map<R>(transform: (T) -> R): Iterator<R>
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func step(count: Int64): Iterator<T>
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func skip(count: Int64): Iterator<T>
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func take(count: Int64): Iterator<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func concat(other: Iterator<T>): Iterator<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func inspect(action: (T) -> Unit): Iterator<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func flatMap<R>(transform: (T) -> Iterator<R>): Iterator<R>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func intersperse(separator: T): Iterator<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func all(predicate: (T) -> Bool): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func any(predicate: (T) -> Bool): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func none(predicate: (T) -> Bool): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func isEmpty(): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func count(): Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func forEach(action: (T) -> Unit): Unit
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func first(): Option<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func last(): Option<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func at(n: Int64): Option<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func reduce(operation: (T, T) -> T): Option<T>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func fold<R>(initial: R, operation: (R, T) -> R): R
}

@!APILevel[
    since: "22"
]
public func sizeOf<T>(): UIntNative where T <: CType

@!APILevel[
    since: "22"
]
public func alignOf<T>(): UIntNative where T <: CType

@!APILevel[
    since: "22"
]
public struct LibC {
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func malloc<T>(count!: Int64 = 1): CPointer<T> where T <: CType
    
    @!APILevel[
        since: "22"
    ]
    public unsafe static func free<T>(p: CPointer<T>): Unit where T <: CType
    
    /**
    * @throws IllegalArgumentException
    * @throws IllegalMemoryException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public unsafe static func mallocCString(str: String): CString
    
    @!APILevel[
        since: "22"
    ]
    public unsafe static func free(cstr: CString): Unit
}

@!APILevel[
    since: "22"
]
public class NegativeArraySizeException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public class NoneValueException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public interface Any {
}

@!APILevel[
    since: "22"
]
public open class Object <: Any {
    @!APILevel[
        since: "22"
    ]
    public const init()
}

@!APILevel[
    since: "22"
]
public func refEq(a: Object, b: Object): Bool

@Intrinsic
@!APILevel[
    since: "22"
]
public unsafe func zeroValue<T>(): T

@!APILevel[
    since: "22"
]
public enum Option<T> {
    @!APILevel[
        since: "22"
    ]
    Some(T) |
    @!APILevel[
        since: "22"
    ]
    None
    /**
    * @throws NoneValueException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func getOrThrow(): T
    
    /**
    * @throws getOrThrow
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func getOrThrow(exception: () -> Exception): T
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func getOrDefault(other: () -> T): T
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func isNone(): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func isSome(): Bool
    
    @!APILevel[
        since: "22"
    ]
    public func map<R>(transform: (T) -> R): Option<R>
    
    @!APILevel[
        since: "22"
    ]
    public func filter(predicate: (T) -> Bool): Option<T>
    
    @!APILevel[
        since: "22"
    ]
    public func flatMap<R>(transform: (T) -> Option<R>): Option<R>
}

@!APILevel[
    since: "22"
]
public func ifSome<T>(o: Option<T>, action: (T) -> Unit): Unit

@!APILevel[
    since: "22"
]
public func ifNone<T>(o: Option<T>, action: () -> Unit): Unit

extend<T> Option<T> <: Equatable<Option<T>> where T <: Equatable<T> {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func ==(that: Option<T>): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator func !=(that: Option<T>): Bool
}

extend<T> Option<T> <: ToString where T <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
}

extend<T> Option<T> <: Hashable where T <: Hashable {
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
}

extend<T> Option<Option<T>> {
    @!APILevel[
        since: "22"
    ]
    public func flatten(): Option<T>
}

@!APILevel[
    since: "22"
]
public class OutOfMemoryError <: Error {
}

@!APILevel[
    since: "22"
]
public class OverflowException <: ArithmeticException {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

/**
* @throws OutOfMemoryError
*/
@Frozen
@!APILevel[
    since: "22",
    throwexception: true
]
public func print(str: String, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(): Unit

/**
* @throws OutOfMemoryError
*/
@Frozen
@!APILevel[
    since: "22",
    throwexception: true
]
public func println(str: String): Unit

/**
* @throws OutOfMemoryError
*/
@Frozen
@!APILevel[
    since: "22",
    throwexception: true
]
public func eprint(str: String, flush!: Bool = true): Unit

/**
* @throws OutOfMemoryError
*/
@Frozen
@!APILevel[
    since: "22",
    throwexception: true
]
public func eprintln(str: String): Unit

/**
* @throws OutOfMemoryError
*/
@Frozen
@!APILevel[
    since: "22",
    throwexception: true
]
public func eprint<T>(arg: T, flush!: Bool = false): Unit where T <: ToString

/**
* @throws OutOfMemoryError
*/
@Frozen
@!APILevel[
    since: "22",
    throwexception: true
]
public func eprintln<T>(arg: T): Unit where T <: ToString

/**
* @throws OutOfMemoryError
*/
@Frozen
@!APILevel[
    since: "22",
    throwexception: true
]
public func print<T>(arg: T, flush!: Bool = false): Unit where T <: ToString

/**
* @throws OutOfMemoryError
*/
@Frozen
@!APILevel[
    since: "22",
    throwexception: true
]
public func println<T>(arg: T): Unit where T <: ToString

/**
* @throws IndexOutOfBoundsException
* @throws IllegalArgumentException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func readln(): String

@Frozen
@!APILevel[
    since: "22"
]
public func print(b: Bool, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(b: Bool): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(c: Rune, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(c: Rune): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(f: Float16, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(f: Float16): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(f: Float32, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(f: Float32): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(f: Float64, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(f: Float64): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(i: Int8, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(i: Int16, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(i: Int32, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(i: Int64, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(i: UInt8, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(i: UInt16, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(i: UInt32, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func print(i: UInt64, flush!: Bool = false): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(i: Int8): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(i: Int16): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(i: Int32): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(i: Int64): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(i: UInt8): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(i: UInt16): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(i: UInt32): Unit

@Frozen
@!APILevel[
    since: "22"
]
public func println(i: UInt64): Unit

@ConstSafe
@!APILevel[
    since: "22"
]
public struct Range<T> <: Iterable<T> where T <: Countable<T> & Comparable<T> & Equatable<T> {
    @!APILevel[
        since: "22"
    ]
    public let start: T
    
    @!APILevel[
        since: "22"
    ]
    public let end: T
    
    @!APILevel[
        since: "22"
    ]
    public let step: Int64
    
    @!APILevel[
        since: "22"
    ]
    public let hasStart: Bool
    
    @!APILevel[
        since: "22"
    ]
    public let hasEnd: Bool
    
    @!APILevel[
        since: "22"
    ]
    public let isClosed: Bool
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public const init(start: T, end: T, step: Int64, hasStart: Bool, hasEnd: Bool, isClosed: Bool)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func iterator(): Iterator<T>
    
    @!APILevel[
        since: "22"
    ]
    public const func isEmpty(): Bool
}

@!APILevel[
    since: "22"
]
public class RangeIterator<T> <: Iterator<T> where T <: Countable<T> & Comparable<T> & Equatable<T> {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func next(): Option<T>
}

@!APILevel[
    since: "22"
]
public interface Resource {
    @!APILevel[
        since: "22"
    ]
    func isClosed(): Bool
    
    @!APILevel[
        since: "22"
    ]
    func close(): Unit
}

/**
* @throws ArithmeticException
*/
@!APILevel[
    since: "22",
    throwexception: true
]
public func sleep(dur: Duration): Unit

@!APILevel[
    since: "22"
]
public class SpawnException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public class StackOverflowError <: Error {
    /**
    * @throws OutOfMemoryError
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public override func printStackTrace(): Unit
}

@!APILevel[
    since: "22"
]
public open class StackTraceElement {
    @!APILevel[
        since: "22"
    ]
    public let declaringClass: String
    
    @!APILevel[
        since: "22"
    ]
    public let methodName: String
    
    @!APILevel[
        since: "22"
    ]
    public let fileName: String
    
    @!APILevel[
        since: "22"
    ]
    public let lineNumber: Int64
    
    @!APILevel[
        since: "22"
    ]
    public init(declaringClass: String, methodName: String, fileName: String, lineNumber: Int64)
}

@ConstSafe
@!APILevel[
    since: "22"
]
public struct String <: Collection<Byte> & Comparable<String> & Hashable & ToString {
    @!APILevel[
        since: "22"
    ]
    public static const empty: String = String()
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public const init()
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(value: Array<Rune>)
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(value: Collection<Rune>)
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func get(index: Int64): Option<Byte>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toRuneArray(): Array<Rune>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func toArray(): Array<Byte>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func iterator(): Iterator<Byte>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func runes(): Iterator<Rune>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func lines(): Iterator<String>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public prop size: Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func isEmpty(): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func isAscii(): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func isAsciiBlank(): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func clone(): String
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func hashCode(): Int64
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func fromUtf8(utf8Data: Array<UInt8>): String
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public unsafe func rawData(): Array<Byte>
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public unsafe static func fromUtf8Unchecked(utf8Data: Array<UInt8>): String
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func indexOf(b: Byte): Option<Int64>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func indexOf(b: Byte, fromIndex: Int64): Option<Int64>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func indexOf(str: String): Option<Int64>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func indexOf(str: String, fromIndex: Int64): Option<Int64>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func lastIndexOf(b: Byte): Option<Int64>
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func lastIndexOf(b: Byte, fromIndex: Int64): Option<Int64>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func lastIndexOf(str: String): Option<Int64>
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func lastIndexOf(str: String, fromIndex: Int64): Option<Int64>
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func count(str: String): Int64
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws OutOfMemoryError
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func split(str: String, removeEmpty!: Bool = false): Array<String>
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    * @throws OutOfMemoryError
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func split(str: String, maxSplits: Int64, removeEmpty!: Bool = false): Array<String>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws OutOfMemoryError
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func lazySplit(str: String, removeEmpty!: Bool = false): Iterator<String>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws OutOfMemoryError
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func lazySplit(str: String, maxSplits: Int64, removeEmpty!: Bool = false): Iterator<String>
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    * @throws OutOfMemoryError
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func replace(old: String, new: String): String
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func toAsciiLower(): String
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func toAsciiUpper(): String
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func toAsciiTitle(): String
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func trimAscii(): String
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func trimAsciiStart(): String
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func trimAsciiEnd(): String
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimStart(set: Array<Rune>): String
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimEnd(set: Array<Rune>): String
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimStart(set: String): String
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimEnd(set: String): String
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimStart(predicate: (Rune) -> Bool): String
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func trimEnd(predicate: (Rune) -> Bool): String
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func removePrefix(prefix: String): String
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func removeSuffix(suffix: String): String
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func contains(str: String): Bool
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func startsWith(prefix: String): Bool
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func endsWith(suffix: String): Bool
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func padStart(totalWidth: Int64, padding!: String = " "): String
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func padEnd(totalWidth: Int64, padding!: String = " "): String
    
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22"
    ]
    public func equalsIgnoreAsciiCase(that: String): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public func compare(str: String): Ordering
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator const func +(right: String): String
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator const func *(count: Int64): String
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator const func <(right: String): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator const func <=(right: String): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator const func >(right: String): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator const func >=(right: String): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator const func ==(right: String): Bool
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public operator const func !=(right: String): Bool
    
    /**
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator const func [](index: Int64): Byte
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public operator const func [](range: Range<Int64>): String
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static func join(strArray: Array<String>, delimiter!: String = String.empty): String
}

@!APILevel[
    since: "22"
]
public class StringBuilder <: ToString {
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public init()
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(str: String)
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(r: Rune, n: Int64)
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(value: Array<Rune>)
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public init(capacity: Int64)
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public prop size: Int64
    
    @Frozen
    @!APILevel[
        since: "22"
    ]
    public prop capacity: Int64
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
    
    /**
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func reset(capacity!: Option<Int64> = None): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @OverflowWrapping
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(r: Rune): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(str: String): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(sb: StringBuilder): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func appendFromUtf8(arr: Array<Byte>): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public unsafe func appendFromUtf8Unchecked(arr: Array<Byte>): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(runeArr: Array<Rune>): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(cstr: CString): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append<T>(v: T): Unit where T <: ToString
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append<T>(val: Array<T>): Unit where T <: ToString
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(b: Bool): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: Int64): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: Int32): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: Int16): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: Int8): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @OverflowWrapping
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: UInt64): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: UInt32): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: UInt16): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: UInt8): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: Float64): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: Float32): Unit
    
    /**
    * @throws IllegalArgumentException
    * @throws IndexOutOfBoundsException
    */
    @Frozen
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func append(n: Float16): Unit
    
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @Frozen
    @OverflowThrowing
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func reserve(additional: Int64): Unit
}

@!APILevel[
    since: "22"
]
public class Thread {
    /**
    * @throws Error
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public static prop currentThread: Thread
    
    /**
    * @throws Error
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public prop id: Int64
    
    /**
    * @throws [set] Error
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public mut prop name: String
    
    @!APILevel[
        since: "22"
    ]
    public prop hasPendingCancellation: Bool
    
    @!APILevel[
        since: "22"
    ]
    public static func handleUncaughtExceptionBy(exHandler: (Thread, Exception) -> Unit): Unit
}

@!APILevel[
    since: "22"
]
public class ThreadLocal<T> {
    /**
    * @throws IndexOutOfBoundsException
    * @throws Error
    * @throws NoneValueException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func get(): ?T
    
    /**
    * @throws Error
    * @throws IndexOutOfBoundsException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func set(value: ?T): Unit
}

@!APILevel[
    since: "22"
]
public class TimeoutException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

@!APILevel[
    since: "22"
]
public interface ToString {
    @!APILevel[
        since: "22"
    ]
    func toString(): String
}

extend Int64 <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend IntNative <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend Int32 <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend Int16 <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend Int8 <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend UInt64 <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend UIntNative <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @OverflowWrapping
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend UInt32 <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend UInt16 <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend UInt8 <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend Float64 <: ToString {
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend Float32 <: ToString {
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend Float16 <: ToString {
    /**
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend Bool <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
}

extend Rune <: ToString {
    /**
    * @throws IndexOutOfBoundsException
    * @throws IllegalArgumentException
    */
    @!APILevel[
        since: "22",
        throwexception: true
    ]
    public func toString(): String
}

extend Unit <: ToString {
    @!APILevel[
        since: "22"
    ]
    public func toString(): String
}

@!APILevel[
    since: "22"
]
public type Byte = UInt8

@!APILevel[
    since: "22"
]
public type Int = Int64

@!APILevel[
    since: "22"
]
public type UInt = UInt64

@!APILevel[
    since: "22"
]
public class UnsupportedException <: Exception {
    @!APILevel[
        since: "22"
    ]
    public init()
    
    @!APILevel[
        since: "22"
    ]
    public init(message: String)
}

